package com.tank.demo.abstractFactory;

import com.tank.demo.myenum.DirEnum;
import com.tank.demo.myenum.TankGroupEnum;
import com.tank.demo.strategy.FireStrategy;
import com.tank.demo.utils.ResourceMgr;
import lombok.Getter;
import lombok.Setter;


@Setter
@Getter
public abstract class BaseTank extends BaseGameObject {

    public DirEnum dir;
    public static final Integer SPEED = 10;
    public boolean moving = false;
    public TankGroupEnum group;
    public Integer oldX,oldY;


    public BaseTank(Integer x, Integer y,DirEnum dir, boolean moving, TankGroupEnum group) {
        this.x = x;
        this.y = y;
        this.dir = dir;
        this.moving = moving;
        this.group = group;
        this.width = ResourceMgr.myTankL.getWidth();
        this.height = ResourceMgr.myTankL.getWidth();
    }

    public abstract void move();

    public abstract void goBack();

    public abstract void fire(FireStrategy myTankFireStrategy);

    public abstract void die();
}
